import java.io.IOException;

public class Servlet extends javax.servlet.http.HttpServlet {
    protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
        String id=request.getParameter("id");
        String password=request.getParameter("password");
        if(id!=""&&password!=""){
            if(id.equals("admin")&&password.equals("123")){
                response.sendRedirect("login_suc.jsp");
            }
            else{
                response.sendRedirect("login_fail.jsp");
            }
        }
        else{
            response.sendRedirect("login_fail.jsp");
        }
    }

}
